package com.example.demo.domian;

import java.util.Objects;

public class CourseGrade {

    private String studentNo;

    private String math;

    private String english;

    private String sports;

    public CourseGrade(String studentNo, String math, String english, String sports) {
        this.studentNo = studentNo;
        this.math = math;
        this.english = english;
        this.sports = sports;
    }

    public String getStudentNo() {
        return studentNo;
    }

    public void setStudentNo(String studentNo) {
        this.studentNo = studentNo;
    }

    public String getMath() {
        return math;
    }

    public void setMath(String math) {
        this.math = math;
    }

    public String getEnglish() {
        return english;
    }

    public void setEnglish(String english) {
        this.english = english;
    }

    public String getSports() {
        return sports;
    }

    public void setSports(String sports) {
        this.sports = sports;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CourseGrade that = (CourseGrade) o;
        return Objects.equals(studentNo, that.studentNo) && Objects.equals(math, that.math) && Objects.equals(english, that.english) && Objects.equals(sports, that.sports);
    }

    @Override
    public int hashCode() {
        return Objects.hash(studentNo, math, english, sports);
    }

    @Override
    public String toString() {
        return
                "学号=" + studentNo + "\t" +
                "数学=" + math + "\t" +
                "英语=" + english + "\t" +
                "体育=" + sports ;
    }
    public CourseGrade(){

    }

}
